class HashlibProxy:
    def __init__(self, which):
        self.which = which
        self.digest_size = self.which().digest_size
    
    def new(self, *args, **kwargs):
        return self.which(*args, **kwargs)        